class Solution:
    def isSubsequence(self, s: str, t: str) -> bool:
        if len(s) == 0:
            return True
        si = 0
        ti = 0
        while si<len(s) and ti<len(t):
            if s[si] == t[ti]:
                si+=1
            ti+=1

        return si>=len(s)

if __name__ == '__main__':
    so = Solution()
    s = "abc"
    t = "ahbgdc"
    r = so.isSubsequence(s, t)
    print(r)
